Release 10.1A: OpenEdge Development:
Open Client Introduction and Programming
The session model
Open Client applications can function in two different session models that control how the client and AppServer interact:
- Session-managed — The client maintains a dedicated physical connection to a single AppServer that handles each request for a given application service. In this session model, the client and AppServer share a common and persistent connection context over which run-time state can be maintained for the duration of the connection. Therefore, this session model is ideally suited for applications that must manage a large and complex transaction scope that includes multiple requests between the client and the AppServer.
- Session-free — The client maintains a logical connection to a given application service, and each client request for that application service can be handled by any one of many AppServer resources (that is, one or more AppServers and one or more AppServer agents of any one AppServer) that support the given application service. In this session model, the client shares no persistent connection context with any one AppServer resource. Each client request can execute on a different AppServer and on a different agent of any one AppServer. This session model supports maximum availability of AppServer resources. Therefore, this session model is ideally suited for applications that require maximum upward scalability and a transaction scope of no more than a single client request.
Session model configuration
The session model is determined by the AppServer configuration, in particular the setting of its operating mode, which can be state-reset, state-aware or stateless for a session-managed application service, and can only be state-free for a session-free application service. However, you must also implement your Open Client interface and program any Open Client applications according to the requirements of the application service, including its session model.
For more information on AppServer configuration and specific programming requirements for the different session models, see OpenEdge Application Server: Developing AppServer Applications .
Connection management
One of the most important requirements in session model programming is how you manage the client connection for each session model. For a session-managed application, the client connection is a physical connection, a one-to-one relationship between the client and AppServer that supports a particular application service. For a session-free application, the client connection is a logical connection, a one-to-many relationship between the client and any number of AppServer resources that support a single application service. To support logical connections, the session-free Open Client maintains a connection pool, which is a configured connection resource that maintains a number of physical AppServer connections to use for all client requests invoked on a given application service.
Each Open Client manages this the session-free connection pool in its own way on behalf of the Open Client application. For .NET and Java Open Clients, the proxies manage the connection pool from run-time property settings that you can modify before and sometimes after establishing the logical connection. For Web service Open Clients, the WSA manages the connection pool for each Web service from similar Web service property settings that can be changed by the Web service administrator.
For more information on physical and logical connections and how they interact with the AppServer, see the sections on the AppServer connection model in OpenEdge Getting Started: Application and Integration Services .
Open Client interface and programming
As noted previously, you must implement the Open Client interface and program the Open Client application according to the session model.
The Open Client interface includes various object types whose function is generally designed to support the session model. You define these objects in ProxyGen to support the given application session model for all Open Clients. For Web services, you must also indicate the session model for which the interface is defined, because ProxyGen generates a different Web service definition depending on the session model. For more information, see Chapter 3, " Generating Proxies and Web Service Definitions."
You must program an Open Client application to reflect the Open Client object design and its support of the required session model. For information on the basic session model requirements for programming applications, see OpenEdge Application Server: Developing AppServer Applications . The following section describes the Open Client object model and how it supports the different session models for all Open Clients. For more information on session model programming for each Open Client type, see:
- OpenEdge Development: .NET Open Clients for .NET Open Clients.
- OpenEdge Development: Java Open Clients for Java Open Clients
- OpenEdge Development: Web Services for Web services.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |